Declaration of pointers to structures:
nThis defines John as a structure and pJohn as a pointer to a structure.
pJohn variable initialisation:
npJohn can be made to point to John:
npJohn = &John;
nnew can be used to allocation memory for pJohn:
nint *pJohn = new student;
Structures and Pointers
Declaration
struct student{
char name[30];
int StudentID;
} John, *pJohn;